// assets/test/pattern-config.ts
export interface PatternConfig {
  name: string;
  pixelSize: number;
  pattern: number[][];
  pixelColor: [number, number, number, number];
  backgroundColor: [number, number, number, number];
}

export const patternConfigs: { [key: string]: PatternConfig } = {
  L: {
    name: 'L字型',
    pixelSize: 20,
    pattern: [
      [1, 0, 0],
      [1, 0, 0],
      [1, 0, 0],
      [1, 1, 1],
    ],
    pixelColor: [255, 0, 0, 255],
    backgroundColor: [0, 0, 0, 0],
  },
  T: {
    name: 'T字型',
    pixelSize: 25,
    pattern: [
      [1, 1, 1],
      [0, 1, 0],
      [0, 1, 0],
      [0, 1, 0],
    ],
    pixelColor: [0, 255, 0, 255],
    backgroundColor: [0, 0, 0, 0],
  },
  I: {
    name: 'I字型',
    pixelSize: 30,
    pattern: [[1], [1], [1], [1]],
    pixelColor: [0, 0, 255, 255],
    backgroundColor: [0, 0, 0, 0],
  },
  SQUARE: {
    name: '正方形',
    pixelSize: 15,
    pattern: [
      [1, 1, 1, 1],
      [1, 0, 0, 1],
      [1, 0, 0, 1],
      [1, 1, 1, 1],
    ],
    pixelColor: [255, 255, 0, 255],
    backgroundColor: [0, 0, 0, 0],
  },
  HEART: {
    name: '心形',
    pixelSize: 30,
    pattern: [
      [0, 1, 0, 1, 0],
      [1, 1, 1, 1, 1],
      [1, 1, 1, 1, 1],
      [0, 1, 1, 1, 0],
      [0, 0, 1, 0, 0],
    ],
    pixelColor: [255, 0, 128, 255],
    backgroundColor: [0, 0, 0, 0],
  },
  test: {
    name: '测试形状',
    pixelSize: 10,
    pattern: [
      [1, 1, 1],
      [1, 1, 1],
      [1, 1, 1],
    ],
    pixelColor: [255, 0, 128, 255],
    backgroundColor: [0, 0, 0, 0],
  },
};